# Contributor: Philipp Arras <c@philipp-arras.de>
# Maintainer: Martin Reinecke <mtr@mpa-garching.mpg.de>
pkgname=py3-ducc0
_pyname=ducc0
pkgver=0.23.0
_tagname=0_23_0
pkgrel=0
pkgdesc="Efficient algorithms for Fast Fourier transforms and more"
url="https://gitlab.mpcdf.mpg.de/mtr/ducc"
arch="all"
license="GPL-2.0-or-later"
depends="python3"
makedepends="py3-setuptools py3-pybind11-dev python3-dev"
checkdepends="py3-pytest py3-numpy"

_pynametag="$_pyname"_"$_tagname"
source="https://gitlab.mpcdf.mpg.de/mtr/ducc/-/archive/$_pynametag/ducc-$_pynametag.tar.gz"
builddir="$srcdir/ducc-$_pynametag"

build() {
	DUCC0_OPTIMIZATION=portable python3 setup.py build
}

check() {
	PYTHONPATH="$(echo $PWD/build/lib.*)" python3 -m pytest python/test
}

package() {
	DUCC0_OPTIMIZATION=portable python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
8b102b0d4ccdc9f22f7f036777cb2339f1ebf35c9ff1b19c38d7061c2fa1ce76436b8a02b58613f363e8bf1ce32d5fdb2deae59b501c2a33a39e848a82947eaf  ducc-ducc0_0_23_0.tar.gz
"
